package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FitnessCoachMapper;
import com.ruoyi.system.domain.FitnessCoach;
import com.ruoyi.system.service.IFitnessCoachService;

/**
 * 教练列表Service业务层处理
 * 
 * @author admin
 * @date 2025-01-04
 */
@Service
public class FitnessCoachServiceImpl implements IFitnessCoachService 
{
    @Autowired
    private FitnessCoachMapper fitnessCoachMapper;

    /**
     * 查询教练列表
     * 
     * @param id 教练列表主键
     * @return 教练列表
     */
    @Override
    public FitnessCoach selectFitnessCoachById(Long id)
    {
        return fitnessCoachMapper.selectFitnessCoachById(id);
    }

    /**
     * 查询教练列表列表
     * 
     * @param fitnessCoach 教练列表
     * @return 教练列表
     */
    @Override
    public List<FitnessCoach> selectFitnessCoachList(FitnessCoach fitnessCoach)
    {
        return fitnessCoachMapper.selectFitnessCoachList(fitnessCoach);
    }

    /**
     * 新增教练列表
     * 
     * @param fitnessCoach 教练列表
     * @return 结果
     */
    @Override
    public int insertFitnessCoach(FitnessCoach fitnessCoach)
    {
        fitnessCoach.setCreateTime(DateUtils.getNowDate());
        return fitnessCoachMapper.insertFitnessCoach(fitnessCoach);
    }

    /**
     * 修改教练列表
     * 
     * @param fitnessCoach 教练列表
     * @return 结果
     */
    @Override
    public int updateFitnessCoach(FitnessCoach fitnessCoach)
    {
        fitnessCoach.setUpdateTime(DateUtils.getNowDate());
        return fitnessCoachMapper.updateFitnessCoach(fitnessCoach);
    }

    /**
     * 批量删除教练列表
     * 
     * @param ids 需要删除的教练列表主键
     * @return 结果
     */
    @Override
    public int deleteFitnessCoachByIds(Long[] ids)
    {
        return fitnessCoachMapper.deleteFitnessCoachByIds(ids);
    }

    /**
     * 删除教练列表信息
     * 
     * @param id 教练列表主键
     * @return 结果
     */
    @Override
    public int deleteFitnessCoachById(Long id)
    {
        return fitnessCoachMapper.deleteFitnessCoachById(id);
    }
}
